//
//  DateUtil.m
//  BondWatch
//
//  Created by Jason Yuan on 2/16/16.
//  Copyright © 2016 Jason Yuan. All rights reserved.
//

#import "DateUtil.h"

@implementation DateUtil

+ (NSDate*) convertDateFromString:(NSString*)uiDate
{
    NSDateFormatter *formatter = [[NSDateFormatter alloc] init] ;
    [formatter setDateFormat:@"MM/dd/yyyy"];
    NSDate *date=[formatter dateFromString:uiDate];
    
    return date;
}

+ (NSString *)todayStringFromDate {
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    [dateFormatter setDateFormat:@"MM/dd/yyyy"];
    NSString *destDateString = [dateFormatter stringFromDate:[NSDate date]];
    
    return destDateString;
}

@end
